package api

import (
	"github.com/gogf/gf/net/ghttp"
	"shrimp-blog-server/app/model"
)

func (*apiComment) Get(request *ghttp.Request) {
	commentService.GetComment(request, getQueryParamID(request)...)

}

func (*apiComment) Post(request *ghttp.Request) {
	var comment []model.Comment
	_ = request.Parse(&comment)
	commentService.UpdateComment(request, comment...)

}

func (*apiComment) Put(request *ghttp.Request) {
	var comment []model.Comment
	_ = request.Parse(&comment)
	commentService.UpdateComment(request, comment...)

}

func (*apiComment) Delete(request *ghttp.Request) {
	commentService.DeleteComment(request, getQueryParamID(request)...)
}
